package com.rssreader.client.mvc.controllers;

import com.extjs.gxt.ui.client.mvc.AppEvent;
import com.extjs.gxt.ui.client.mvc.Controller;
import com.rssreader.client.mvc.events.AppEvents;
import com.rssreader.client.mvc.views.NavView;

public class NavController extends Controller {
    private NavView navView;

    public NavController() {
	registerEventTypes(AppEvents.Init);
	registerEventTypes(AppEvents.TabSelected);
	registerEventTypes(AppEvents.FeedAdded);
    }

    @Override
    public void handleEvent(AppEvent event) {
	forwardToView(navView, event);
    }

    @Override
    protected void initialize() {
	super.initialize();
	navView = new NavView(this);
    }
}
